package cvslogic.elements;

import util.AuxiliaryFunctions;

import com.pavelvlasov.uml.Classifier;
import com.pavelvlasov.uml.Element;
import com.pavelvlasov.uml.ModelElement;

public class CompareActor {

	private CompareClassifier compareClassifier = new CompareClassifier();
	private CompareElement compareElement = new CompareElement();
	private CompareElement compareModelElement = new CompareElement();

	public void compareActors(Object[] newActors, Object[] oldActors) {

		for (Object newActor : newActors) {
			Element oldActor = AuxiliaryFunctions.getByID(oldActors, newActor);

			if (oldActor != null) {
				System.out.println("Actor: " + oldActor.getName());
				compareElement.compareProperties((Element) oldActor,
						(Element) newActor);
				compareModelElement.compareProperties((ModelElement) oldActor,
						(ModelElement) newActor);
				compareClassifier.compareProperties((Classifier) oldActor,
						(Classifier) newActor);
			}
			System.out.println("---");
		}

	}
}
